import request from '@/utils/request'
// 查询客户
export function fetchList(query) {
  return request({
    url: '/customer/list',
    method: 'get',
    params: query,
    baseURL: process.env.VUE_APP_SERVER_BASE_API
  })
}
// 删除客户
export function deleteCustomer(id) {
  return request({
    url: `/customer/delete/${id}`,
    method: 'get',
    baseURL: process.env.VUE_APP_SERVER_BASE_API
  })
}
// 新增客户
export function addCustomer(data) {
  return request({
    url: '/customer/add',
    method: 'post',
    data,
    baseURL: process.env.VUE_APP_SERVER_BASE_API
  })
}

// 更新客户
export function updateCustomer(data) {
  return request({
    url: '/customer/update',
    method: 'post',
    data,
    baseURL: process.env.VUE_APP_SERVER_BASE_API
  })
}
